/*
 * @Description:
 * @Version: 2.0
 * @Autor: wangmiao
 * @Date: 2022-08-31 14:28:18
 * @LastEditors: wangmiao
 * @LastEditTime: 2022-09-16 16:54:09
 */

import React, { useState, useEffect } from 'react'
import { Button } from 'antd'
import AreaSelector from '@/components/AreaSelector'
import styles from './index.module.scss'
import { formInfoType } from '@/models/home'

interface IProps {}

const Home: React.FC<IProps> = () => {
  const [formInfo, setFormInfo] = useState<formInfoType>({
    provincial: '',
    regional: '',
    county: '',
    PageSize: 20,
    PageNo: 1,
  })

  const queryData = () => {
    console.log(formInfo)
  }

  return (
    <div className={styles.container}>
      <div className={styles.header}>
        <AreaSelector formInfo={formInfo} setFormInfo={setFormInfo}></AreaSelector>
        <Button type='primary' onClick={queryData}>
          查询
        </Button>
      </div>
    </div>
  )
}

export default Home
